package task.domain.converters
{
    import org.flexthinker.binding.conversion.Converter;

    import task.domain.TaskCategory;

    /**
     * Converts a Task into a String
     */
    public class CategoryToStringConverter implements Converter
    {
        public function CategoryToStringConverter()
        {
        }


        public function convertForward(value:*):*
        {
            return value ? TaskCategory(value).label : "(not specified)";
        }

        public function convertReverse(value:*):*
        {
            // converts a String into a TaskCategory
            return null;
        }
    }
}
